<%@ Page Language="C#" Description="Component Test Program" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="BusObjectCS" %>
<%@ Import Namespace="BusObjectVB" %>
<html>
<script language="C#" runat=server>


void Page_Load(Object sender, EventArgs evArgs){
	String dsn = "server=localhost;uid=sa;pwd=;database=IBuyAdventure";

//	BusObjectCS.IBAProducts objProducts = new BusObjectCS.IBAProducts();
	BusObjectVB.IBAProducts objProducts = new BusObjectVB.IBAProducts();

	objProducts.DatabaseConnection = dsn;

	DataSet prodTypes = objProducts.GetProductTypes();

	productList.DataSource = prodTypes;
	productList.DataBind();


}

</script>

<body>
  <h3><font face="Verdana">List of Product Types</font></h3>

<asp:DataList id="productList" runat="server">

  <headertemplate>
   <table border=1>
	<tr><th>Click to Display list of products</th></tr>
  </headertemplate>

  <itemtemplate>
       <tr>
       <td align=center>
 	 <%# DataBinder.Eval(Container.DataItem, "ProductType", "<a href=\"displayProducts.aspx?PID={0}\">{0}</a>") %>
       </td> 
   
      </tr>
   </itemtemplate>

  <footertemplate>
   </table>
  </footertemplate>

</asp:DataList>




</body>
</html>
